package com.yuandian.bpm.bi.modules.user.vo;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 分页过滤条件
 */
@Data
public class BasePage {

	/**
	 * 每页大小
	 **/
	@TableField(exist = false)
	@ApiModelProperty(value = "每页大小")
	private Integer pageSize = 10;

	/**
	 * 第几页
	 **/
	@TableField(exist = false)
	@ApiModelProperty(value = "当前页数")
	private Integer pageNum = 1;

	/**
	 * 排序列
	 */
	@TableField(exist = false)
	@ApiModelProperty(value = "排序列")
	private String orderByColumn;

	/**
	 * 排序的方向 "desc" 或者 "asc".
	 */
	@TableField(exist = false)
	@ApiModelProperty(value = "排序的方向")
	private String isAsc;

	public void setPageSize(Integer pageSize) {
		if(ObjectUtil.isNotEmpty(pageSize)){
			this.pageSize = pageSize;
		}
	}

	public void setPageNum(Integer pageNum) {
		if(ObjectUtil.isNotEmpty(pageNum)){
			this.pageNum = pageNum;
		}
	}
}
